package com.zd.springcloud.provider.controller;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/data", produces = "application/json;charset=UTF-8")
public class ServiceTestController {
    @Value("${server.port}")
    private int port;
    @Value("${spring.application.name}")
    private String name;

    @ResponseBody
    @RequestMapping("/test")
   // @SentinelResource(value = "collect-extract", blockHandler = "blockHandler")
    public String test() {
        return name + "  " + port;
    }
}